home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-16 | 8.3 KB | 250 lines | [TEXT/MPS ] |
- #-------------------------------------------------------------------------------
- # UserStartup•mine
- # MPW Shell Script
- # Written by Gina Cherry, Mark Baumwell, and Godfrey DiGiorgi • August 16, 1991
- # Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
- #
- # Usage:
- # UserStartup•mine is executed automatically from the Startup script when MPW is launched.
- #
- # Function:
- # UserStartup•mine creates aliases, defines shell variables, and adds frequently used
- # commands to the menus. This script is meant to be an example of some of the commands
- # you may want to include in your UserStartup file. It should be modified to conform to
- # your file setup and preferences.
- #-------------------------------------------------------------------------------
-
-
- # Position cursor at end of worksheet.
- Find ∞ "{Worksheet}"
-
-
- #-------------------------------------------------------------------------------
- # Define aliases
- #-------------------------------------------------------------------------------
- # Aliases for shell commands.
- Alias Cat Catenate
- Alias Cd Directory
- Alias Cp Duplicate
- Alias Grep Search
- Alias Ls Files
- Alias Mkdir Newfolder
- Alias Mv Move
- Alias Pr Print
- Alias Pwd Directory
- Alias Rm Delete
-
- # Aliases for applications.
- # Change these aliases to conform to your system.
- Alias Res '"HD:ResEdit"'
- Alias MSWord '"HD:Microsoft Word"'
- Alias ALink '"HD:AppleLink"'
-
-
- #-------------------------------------------------------------------------------
- # Initialize shell variables.
- #-------------------------------------------------------------------------------
- # Define a new shell variable Word.
- Set Word "[{WordSet}]+"
- # Make Word variable available to other scripts.
- Export Word
-
- # Define a new shell variable Scripts.
- Set Scripts "{MPW}Scripts:"
- # Make Scripts variable available to other scripts.
- Export Scripts
-
- # Define a new shell variable Source.
- # Change this definition to conform to your system.
- Set Source "{MPW}Source Code"
- # Make Source variable available to other scripts.
- Export Source
-
- # Define shell variable openList to be used by the script MyOpen
- # Change this definition to conform to your system.
- Set openList "':' '{Scripts}' '{Source}' '{MPW}'"
- # Make openList variable available to other scripts.
- Export openList
-
- # Set the Commands shell variable, which tells the shell where to look for commands to execute.
- # Change this definition to conform to your system.
- Set Commands ":,{MPW}Tools:,{MPW}Scripts:,{MPW}MyTools:,{MPW}MyScripts:"
- # Make the Commands variable available to other scripts.
- Export Commands
-
- # Set the DirectoryPath shell variable, which tells the shell where to look for directories when
- # changing directories. This allows the user to type shorter pathnames when changing to commonly
- # used directories.
- # Change this definition to conform to your system.
- Set DirectoryPath ":,{MPW},{Scripts},{MPW}MyScripts:,{Source}"
- # Make DirectoryPath variable available to other scripts.
- Export DirectoryPath
-
- # Change the following definitions to suit your preferences:
-
- # Set the default font for new windows.
- Set Font Geneva
-
- # Set the default font size for new windows.
- Set FontSize 10
-
- # Set the default window size for new windows.
- Set NewWindowRect 0,0,400,500
-
- # Set default window size for zooming. In this example, ZoomWindowRect is set to a reasonable size
- # for a 2 page monitor, so that windows won't zoom to the full size of the monitor when the user clicks
- # on the zoom box.
- Set ZoomWindowRect 0,550,825,1100
-
- # Set options used by print menu. Print page headers at top of each page. Set form feed to œ
- # (option q). Print line numbers to left of printed text. Write progress information to diagnostic
- # output.
- Set PrintOptions '-h -ff œ -n -p'
-
-
- #-------------------------------------------------------------------------------
- # Mount Current Projects
- #-------------------------------------------------------------------------------
- # Change this command to mount projects on which you are currently working.
- MountProject MyProject
-
-
- #-------------------------------------------------------------------------------
- # Customize menus
- #-------------------------------------------------------------------------------
- # Modify the Edit menu.
- # Add disabled separator bar.
- AddMenu Edit '(-' ''
- # Add commands and their keyboard equivalents.
- AddMenu Edit 'Show Invisibles/2' ∂
- 'ShowNPChar'
- AddMenu Edit 'Comment/3' ∂
- 'Comment "{Active}"'
- AddMenu Edit 'LtoU/4' ∂
- 'LtoU "{Active}"'
- AddMenu Edit 'UtoL/5' ∂
- 'UtoL "{Active}"'
-
- # Modify the Find menu.
- # Add Commando dialog for ReplaceAll
- AddMenu Find 'Replace All/P' ∂
- 'ReplaceAll…'
- # Add disabled separator bar.
- AddMenu Find (- ''
- # Add GoTo command to the Find menu.
- AddMenu Find 'GoTo/7' ∂
- 'GoTo "{Active}"'
- # Add Commando dialogs for WhereIs and Search to the Find menu.
- AddMenu Find 'WhereIs/8' ∂
- 'WhereIs…'
- AddMenu Find 'Search/9' ∂
- 'SearchAll…'
- AddMenu Find 'Search & Set/¥' ∂
- 'SS'
-
- # Create the Directory menu
- # Change this section to add other frequently used directories to the parameter list.
- DirectoryMenu "{Scripts}" "{Source}" `Directory`
-
- # Modify the Projector menu
- # Add disabled separator bar.
- AddMenu Project '(-' ''
- # Add Commando dialog for NameRevisions command.
- AddMenu Project 'Name Revisions' ∂
- 'NameRevisions…'
- # Add Commando for RevertToRevision command
- AddMenu Project 'Revert To Old Revision' ∂
- 'RevertToRevision'
-
-
- # Create the Tools menu
- # Add disabled separator bar and header.
- AddMenu Tools '(-' ''
- AddMenu Tools '(Application Tools ' ''
- AddMenu Tools '(-' ''
- # Add applications to Tools menu
- # Change this section to add other frequently used applications.
- AddMenu Tools 'Microsoft Word' ∂
- 'MSWord'
- AddMenu Tools 'AppleLink' ∂
- 'ALink'
- AddMenu Tools 'ResEdit' ∂
- 'Res'
-
- # Add disabled separator bar and header.
- AddMenu Tools '(-' ''
- AddMenu Tools '(Other Tools ' ''
- AddMenu Tools '(-' ''
- # Add other tools to Tools menu.
- AddMenu Tools 'Prototype C Functions' ∂
- 'ProtoGen…'
- AddMenu Tools 'Mark C Functions' ∂
- 'MarkIt…'
- AddMenu Tools A2Hex ∂
- 'A2Hex "{Active}" ∑∑ "{Worksheet}"'
- AddMenu Tools 'Conversion Table' ∂
- 'Open -r "{MPW}Scripts:Dec-Oct-Hex-BinTable"'
- AddMenu Tools 'Indicate 80 Columns' ∂
- 'Indicate80Columns'
-
-
- # Create the Commands menu
- # Add disabled separator bar and header.
- AddMenu Commands '(-' ''
- AddMenu Commands '(ACTIVE' ''
- AddMenu Commands '(-' ''
- # Add command to echo the name of the active window to the worksheet.
- AddMenu Commands 'Echo Active' ∂
- 'Echo "{Active}" >> {Worksheet}'
- # Add command to position cursor at the top of the active window.
- AddMenu Commands 'TOP of Active file' ∂
- 'Find • "{Active}"'
- # Add command to position cursor at the bottom of the active window.
- AddMenu Commands 'BOTTOM of Active file' ∂
- 'Find ∞ "{Active}"'
-
- # Add disabled separator bar and header.
- AddMenu Commands '(-' ''
- AddMenu Commands '(TARGET' ''
- AddMenu Commands '(-' ''
- # Add command to echo the name of the target window to the worksheet.
- AddMenu Commands 'Echo Target' ∂
- 'Echo "{Target}" >> "{Worksheet}"'
- # Add command to position cursor at the top of the target window.
- AddMenu Commands 'TOP of Target file' ∂
- 'Find • "{Target}"'
- # Add command to position cursor at the bottom of the target window.
- AddMenu Commands 'BOTTOM of Target file' ∂
- 'Find ∞ "{Target}"'
-
- # Add disabled separator bar and header.
- AddMenu Commands '(-' ''
- AddMenu Commands '(Window Management' ''
- AddMenu Commands '(-' ''
- # Add command to save all windows.
- AddMenu Commands 'Save All/E' ∂
- "Save -a"
- # Add command to close all windows.
- AddMenu Commands 'Close All/K' ∂
- "Close -a"
- # Add disabled separator bar.
- AddMenu Commands '(-' ''
- AddMenu Commands 'RotateWindows/®' ∂
- 'RotateWindows'
- AddMenu Commands 'Cleanup Windows/©' ∂
- "CleanWindows"
- AddMenu Commands 'Side-By-Side/ß' ∂
- "VTileWindows ≥ Dev:Null"
- AddMenu Commands 'Small Window/∑' ∂
- "SmallWindow"
-
- AddMenu Commands '(-' ''
- AddMenu Commands '(Other Commands' ''
- AddMenu Commands '(-' ''
- Execute AddDeleteMenu
- AddMenu Commands 'Search and Open/Ω' 'MyOpen'
-
- # Set the current directory to Source.
- # Change this command to set directory to the directory of your preference.
- SetDirectory "{Source}"
-